#include <stdio.h>
#include "utils.h"

extern void scan(string_t);
extern void parse(string_t, bool);

//-------------------------------------------------
// main
// 			Check command line arguments
//			Usage: espresso -[l|p|c] <file>
//-------------------------------------------------


int main(int argc, char **argv)
{
		argc--; argv++;
    
		switch (argv[0][1]) {
			case 'l':
			  scan(argv[1]);
				break;

			case 'p':
				parse(argv[1], false);
				break;

			case 'c':
			  parse(argv[1], true);
				break;

			default:
				fprintf(stderr, "Can resolute arg '%c'.", argv[0][1]);
		}

		return 0;
}
